package com.matrix.java.chap_05;

import java.util.Scanner;

/*
    计算机体系结构：比特级的操作
 */
// FIXME: 2021/11/18 十进制转二进制
public class Ex5_44 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter an integer: ");
        int originNum = input.nextInt();
        for (int i = 16; i >= 0; i--) {
            System.out.print((originNum & 1 << i) == 0 ? "0" : "1");
        }
        input.close();
    }
}
